package com.lz.sports.adapter

import com.lz.library.adapter.BindingAdapter
import com.lz.library.adapter.BindingViewHolder
import com.lz.sports.BR
import com.lz.sports.R
import com.lz.sports.bean.ExamInspect
import com.lz.sports.databinding.ItemExamBindingImpl

class ExamAdapter(private val showMixing: Boolean = true) : BindingAdapter<ExamInspect>() {

    override fun getLayoutResId(viewType: Int): Int = R.layout.item_exam

    override fun getVariableId(viewType: Int): Int = BR.inspect

    override fun onBindViewHolder(vh: BindingViewHolder, position: Int) {
        super.onBindViewHolder(vh, position)
        vh.getBinding<ItemExamBindingImpl>().showMixing = showMixing
    }
}